import request from "../../utils/request"

// pages/video/video.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    navDataLit:[],
    navId:'',
    mvData:[],
    videoId:'',
    videoUpdateTime:[],
    isTriggered:false,//刷新状态
    
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    // //   测试
   
    // this.gettext()
    
//获取导航栏数据
this.getNavData()
  },
  
// //测试
// async gettext(){
//    let aa =  await request('/video/timeline/all')
//    console.log(aa);
// },
  // 请求获取导航栏数据
async getNavData() {
  let res = await request('/video/group/list')
//   console.log(res);
  
  this.setData({
    navDataLit:res.data.slice(0,14),
    navId:res.data[0].id
  })
  this.getMV(this.data.navId)
  },

// 请求视频数据
 async getMV(userId){
  
let {datas} =await request('/video/group',{id:userId})
// console.log(datas,'视频数据');
// 拿到数据关闭加载框
// iid = res.datas.map(item =>item.data.vid)
let iid = []
for(let i =0;i<datas.length;i++){
    const {urls} = await request('/video/url', { id:  datas[i].data.vid});
    // console.log(urls[0])
    iid.push(urls[0])
}
wx.hideLoading()

// 关闭下拉加载
this.setData({
  isTriggered:false
})
let index = 0;
//给数组添加id
let mvData =datas.map(item =>{
  item.id = index++;
  item.data.urlInfo = iid[index]
  return item
})

// console.log(res);
this.setData({
  mvData
})
  },


  // 点击导航活跃
  changNav(event) {
let navId = event.currentTarget.id;
// console.log(navId);
this.setData({
  // *1 代表转字符串类型转换为数字类型  id 是数字类型
  navId:navId*1,
  mvData:[]
})
// 显示正在加载
wx.showLoading({
  title:'正在加载'
})
this.getMV(this.data.navId)
  },
//   处理单一播放
  handledPlay(event){
// 点击播放当前视频找到删一个播放的视频
// 关闭删上一个播放的视频
//接受传过来的vid
let vid = event.currentTarget.id;
console.log(event.currentTarget);
// 关闭上一个视频
// this.vid !==vid && this.videoContext&&this.videoContext.stop()

// this.vid = vid;
this.setData({
  videoId:vid
})
// console.log(vid);
 this.videoContext =  wx.createVideoContext(vid);
//  console.log( wx.createVideoContext(vid));
//  判断播放的视频是否有播放记录
let {videoUpdateTime} = this.data
let videoItem = videoUpdateTime.find(item => item.vid === vid);
if(videoItem) {
  videoContext.seek(videoItem.currentTime);
}
 this.videoContext.play();
  },

   // 监听视频播放进度的回调
  handleTimeUpdata(event){
    let videoTimeObj = {vid: event.currentTarget.id, currentTime: event.detail.currentTime};
    let {videoUpdateTime} = this.data;
    console.log(event);
    /*
    * 思路： 判断记录播放时长的videoUpdateTime数组中是否有当前视频的播放记录
    *   1. 如果有，在原有的播放记录中修改播放时间为当前的播放时间
    *   2. 如果没有，需要在数组中添加当前视频的播放对象
    *
    * */
    let videoItem = videoUpdateTime.find(item => item.vid === videoTimeObj.vid);
    if(videoItem){ // 之前有
      videoItem.currentTime = event.detail.currentTime;
    }else { // 之前没有
      videoUpdateTime.push(videoTimeObj);
    }
    // 更新videoUpdateTime的状态
    this.setData({
      videoUpdateTime
    }) 
  },
  // 视频播放结束调用的回调
  handleEnded(event){
       // 移除记录播放时长数组中当前视频的对象
    let {videoUpdateTime} = this.data;
    videoUpdateTime.splice(videoUpdateTime.findIndex(item => item.vid === event.currentTarget.id), 1);
    this.setData({
      videoUpdateTime
    })
  },

  // 下拉刷新
  handleRefresh(){
console.log('下拉刷新');
this.getMV(this.data.navId)

  },

  // 上拉加载handleTolower
  handleTolower(){
console.log('上拉加载');
let newVideoList = [
  {
      "type": 1,
      "displayed": false,
      "alg": "onlineHotGroup",
      "extAlg": null,
      "data": {
          "alg": "onlineHotGroup",
          "scm": "1.music-video-timeline.video_timeline.video.181017.-295043608",
          "threadId": "R_VI_62_4C7E35CD0271EECBB6008525B68E7211",
          "coverUrl": "https://p2.music.126.net/VpAYjmHRJZAeH5i-uaRCHg==/109951164298093205.jpg",
          "height": 1080,
          "width": 1920,
          "title": "【4K横拍】泫雅 - Talk (190721 Waterbomb音乐节)",
          "description": "",
          "commentCount": 20,
          "shareCount": 52,
          "resolutions": [
              {
                  "resolution": 240,
                  "size": 61449382
              },
              {
                  "resolution": 480,
                  "size": 118272459
              },
              {
                  "resolution": 720,
                  "size": 186585694
              },
              {
                  "resolution": 1080,
                  "size": 372622902
              }
          ],
          "creator": {
              "defaultAvatar": false,
              "province": 1000000,
              "authStatus": 0,
              "followed": false,
              "avatarUrl": "http://p1.music.126.net/_RMfyoBvxi_B477jQvcZtQ==/109951164872628349.jpg",
              "accountStatus": 0,
              "gender": 1,
              "city": 1004400,
              "birthday": 840556800000,
              "userId": 34616088,
              "userType": 204,
              "nickname": "LA角斗士",
              "signature": "Stay Alive",
              "description": "",
              "detailDescription": "",
              "avatarImgId": 109951164872628350,
              "backgroundImgId": 109951163484001120,
              "backgroundUrl": "http://p1.music.126.net/2HvSVB6h_ydXsfyu1K2oig==/109951163484001128.jpg",
              "authority": 0,
              "mutual": false,
              "expertTags": null,
              "experts": {
                  "1": "音乐视频达人"
              },
              "djStatus": 10,
              "vipType": 11,
              "remarkName": null,
              "avatarImgIdStr": "109951164872628349",
              "backgroundImgIdStr": "109951163484001128"
          },
          "urlInfo": {
              "id": "4C7E35CD0271EECBB6008525B68E7211",
              "url": "http://vodkgeyttp9.vod.126.net/vodkgeyttp8/6N3qNhbN_2606374258_uhd.mp4?ts=1619323508&rid=1F423AD7C74CCE3ACEAA5BF55E732BDC&rl=3&rs=XHXTZtIVRBJilnKQxNePSILkEjusJTdy&sign=a1a52ebd04c5ef60636e911a16240737&ext=p6e863LWYwFO5hlV3qTyD1ouRa8j9D%2BJELso5ezqMspkSCxr18hUDji2DfBJPVQ8CmgUnVFfy1Ma5LnHPasTXFOHSAyB72EigNk6%2BC%2FZfzFzCXfJpnZsCHD55pWRsmq5oYZNPamPOtm2krGasylfCmPgNQKb20yeSUJlZoC741K3tYpmpvMPUAApRXsGD6%2Fl%2BLtSOX8lUXEuI25mdE5XiqcPHwQSRUWKxmBkLdDZna3n1apIyc%2FaZ22Ewi%2BM%2Bk3O",
              "size": 372622902,
              "validityTime": 1200,
              "needPay": false,
              "payInfo": null,
              "r": 1080
          },
          "videoGroup": [
              {
                  "id": -8005,
                  "name": "#收藏榜#",
                  "alg": "groupTagRank"
              },
              {
                  "id": 218120,
                  "name": "金泫雅",
                  "alg": "groupTagRank"
              },
              {
                  "id": 57110,
                  "name": "饭拍现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 1101,
                  "name": "舞蹈",
                  "alg": "groupTagRank"
              },
              {
                  "id": 1100,
                  "name": "音乐现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 58100,
                  "name": "现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 5100,
                  "name": "音乐",
                  "alg": "groupTagRank"
              }
          ],
          "previewUrl": null,
          "previewDurationms": 0,
          "hasRelatedGameAd": false,
          "markTypes": null,
          "relateSong": [],
          "relatedInfo": null,
          "videoUserLiveInfo": null,
          "vid": "4C7E35CD0271EECBB6008525B68E7211",
          "durationms": 410521,
          "playTime": 136120,
          "praisedCount": 485,
          "praised": false,
          "subscribed": false
      }
  },
  {
      "type": 1,
      "displayed": false,
      "alg": "onlineHotGroup",
      "extAlg": null,
      "data": {
          "alg": "onlineHotGroup",
          "scm": "1.music-video-timeline.video_timeline.video.181017.-295043608",
          "threadId": "R_VI_62_5674D8E52C242FA122C45169BA6BF0F1",
          "coverUrl": "https://p2.music.126.net/t1PJ3_MlIcUbT_BSXE2OiQ==/109951165223997018.jpg",
          "height": 1080,
          "width": 1920,
          "title": "刘宪华翻唱《Savage Love》",
          "description": "刘宪华翻唱《Savage Love》",
          "commentCount": 142,
          "shareCount": 1121,
          "resolutions": [
              {
                  "resolution": 240,
                  "size": 33465397
              },
              {
                  "resolution": 480,
                  "size": 54702378
              },
              {
                  "resolution": 720,
                  "size": 80306295
              },
              {
                  "resolution": 1080,
                  "size": 114405852
              }
          ],
          "creator": {
              "defaultAvatar": false,
              "province": 1000000,
              "authStatus": 0,
              "followed": false,
              "avatarUrl": "http://p1.music.126.net/NrINx4mDAb-xmmdISc22Iw==/1369991489406144.jpg",
              "accountStatus": 0,
              "gender": 1,
              "city": 1004400,
              "birthday": 724608000000,
              "userId": 135257924,
              "userType": 204,
              "nickname": "YouTube翻唱精选",
              "signature": "发布最新最快的高清翻唱MV，欢迎关注。",
              "description": "",
              "detailDescription": "",
              "avatarImgId": 1369991489406144,
              "backgroundImgId": 2002210674180198,
              "backgroundUrl": "http://p1.music.126.net/i0qi6mibX8gq2SaLF1bYbA==/2002210674180198.jpg",
              "authority": 0,
              "mutual": false,
              "expertTags": null,
              "experts": {
                  "1": "音乐视频达人",
                  "2": "欧美音乐资讯达人"
              },
              "djStatus": 0,
              "vipType": 11,
              "remarkName": null,
              "avatarImgIdStr": "1369991489406144",
              "backgroundImgIdStr": "2002210674180198"
          },
          "urlInfo": {
              "id": "5674D8E52C242FA122C45169BA6BF0F1",
              "url": "http://vodkgeyttp9.vod.126.net/vodkgeyttp8/QaX04kK1_3083903546_uhd.mp4?ts=1619323508&rid=1F423AD7C74CCE3ACEAA5BF55E732BDC&rl=3&rs=XgffUSKtoqmmbwvlNMOtkOTpVRnmvUCq&sign=a1cf40c1a9dc9d6b82753039eae32c05&ext=p6e863LWYwFO5hlV3qTyD1ouRa8j9D%2BJELso5ezqMspkSCxr18hUDji2DfBJPVQ8CmgUnVFfy1Ma5LnHPasTXFOHSAyB72EigNk6%2BC%2FZfzFzCXfJpnZsCHD55pWRsmq5oYZNPamPOtm2krGasylfCmPgNQKb20yeSUJlZoC741K3tYpmpvMPUAApRXsGD6%2Fl%2BLtSOX8lUXEuI25mdE5XiqcPHwQSRUWKxmBkLdDZna3n1apIyc%2FaZ22Ewi%2BM%2Bk3O",
              "size": 114405852,
              "validityTime": 1200,
              "needPay": false,
              "payInfo": null,
              "r": 1080
          },
          "videoGroup": [
              {
                  "id": 3101,
                  "name": "综艺",
                  "alg": "groupTagRank"
              },
              {
                  "id": 13139,
                  "name": "韩语",
                  "alg": "groupTagRank"
              },
              {
                  "id": 4101,
                  "name": "娱乐",
                  "alg": "groupTagRank"
              },
              {
                  "id": 1100,
                  "name": "音乐现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 58100,
                  "name": "现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 5100,
                  "name": "音乐",
                  "alg": "groupTagRank"
              }
          ],
          "previewUrl": null,
          "previewDurationms": 0,
          "hasRelatedGameAd": false,
          "markTypes": null,
          "relateSong": [],
          "relatedInfo": null,
          "videoUserLiveInfo": null,
          "vid": "5674D8E52C242FA122C45169BA6BF0F1",
          "durationms": 208701,
          "playTime": 402889,
          "praisedCount": 6861,
          "praised": false,
          "subscribed": false
      }
  },
  {
      "type": 1,
      "displayed": false,
      "alg": "onlineHotGroup",
      "extAlg": null,
      "data": {
          "alg": "onlineHotGroup",
          "scm": "1.music-video-timeline.video_timeline.video.181017.-295043608",
          "threadId": "R_VI_62_A8288CA4C7AEAD825548B8916D4F2BCC",
          "coverUrl": "https://p2.music.126.net/td52bw0gVfzEdZJpuFoxRg==/109951163573063029.jpg",
          "height": 720,
          "width": 1280,
          "title": "Pitbull神曲《Wild Wild Love》&《Timber》，美女如云！",
          "description": "Pitbull《Wild Wild Love》&《Timber》超燃现场版，美女如云，满眼都是大长腿！",
          "commentCount": 403,
          "shareCount": 1222,
          "resolutions": [
              {
                  "resolution": 240,
                  "size": 34565702
              },
              {
                  "resolution": 480,
                  "size": 49358751
              },
              {
                  "resolution": 720,
                  "size": 78406824
              }
          ],
          "creator": {
              "defaultAvatar": false,
              "province": 340000,
              "authStatus": 0,
              "followed": false,
              "avatarUrl": "http://p1.music.126.net/C6VID_CReqmt8ETsUWaYTQ==/18499283139231828.jpg",
              "accountStatus": 0,
              "gender": 0,
              "city": 340100,
              "birthday": -2209017600000,
              "userId": 479954154,
              "userType": 201,
              "nickname": "音乐诊疗室",
              "signature": "当我坐在那架破旧古钢琴旁边的时候，我对最幸福的国王也不羡慕。（合作推广请私信，或者+V信：mjs927721）",
              "description": "",
              "detailDescription": "",
              "avatarImgId": 18499283139231828,
              "backgroundImgId": 1364493978647983,
              "backgroundUrl": "http://p1.music.126.net/i4J_uvH-pb4sYMsh4fgQAA==/1364493978647983.jpg",
              "authority": 0,
              "mutual": false,
              "expertTags": null,
              "experts": {
                  "1": "音乐视频达人",
                  "2": "音乐资讯达人"
              },
              "djStatus": 0,
              "vipType": 0,
              "remarkName": null,
              "avatarImgIdStr": "18499283139231828",
              "backgroundImgIdStr": "1364493978647983"
          },
          "urlInfo": {
              "id": "A8288CA4C7AEAD825548B8916D4F2BCC",
              "url": "http://vodkgeyttp9.vod.126.net/vodkgeyttp8/SlXTVFe2_1329355368_shd.mp4?ts=1619323508&rid=1F423AD7C74CCE3ACEAA5BF55E732BDC&rl=3&rs=ErzuKWapdSIacLbDHmoObuyPgFvfdcjF&sign=686c9c716e4e66a7aadcba9b78391176&ext=p6e863LWYwFO5hlV3qTyD1ouRa8j9D%2BJELso5ezqMspkSCxr18hUDji2DfBJPVQ8CmgUnVFfy1Ma5LnHPasTXFOHSAyB72EigNk6%2BC%2FZfzFzCXfJpnZsCHD55pWRsmq5oYZNPamPOtm2krGasylfCmPgNQKb20yeSUJlZoC741K3tYpmpvMPUAApRXsGD6%2Fl%2BLtSOX8lUXEuI25mdE5XiqcPHwQSRUWKxmBkLdDZna3n1apIyc%2FaZ22Ewi%2BM%2Bk3O",
              "size": 78406824,
              "validityTime": 1200,
              "needPay": false,
              "payInfo": null,
              "r": 720
          },
          "videoGroup": [
              {
                  "id": -12480,
                  "name": "#★【欧美】超爽节奏控★#",
                  "alg": "groupTagRank"
              },
              {
                  "id": 57106,
                  "name": "欧美现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 57108,
                  "name": "流行现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 1100,
                  "name": "音乐现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 58100,
                  "name": "现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 5100,
                  "name": "音乐",
                  "alg": "groupTagRank"
              }
          ],
          "previewUrl": null,
          "previewDurationms": 0,
          "hasRelatedGameAd": false,
          "markTypes": null,
          "relateSong": [
              {
                  "name": "Wild Wild Love",
                  "id": 28282300,
                  "pst": 0,
                  "t": 0,
                  "ar": [
                      {
                          "id": 41143,
                          "name": "Pitbull",
                          "tns": [],
                          "alias": []
                      }
                  ],
                  "alia": [],
                  "pop": 60,
                  "st": 0,
                  "rt": "",
                  "fee": 8,
                  "v": 20,
                  "crbt": null,
                  "cf": "",
                  "al": {
                      "id": 2767164,
                      "name": "Wild Wild Love",
                      "picUrl": "http://p4.music.126.net/1hH8cVbqxhlAM3YSVYDy6A==/18548761162566034.jpg",
                      "tns": [],
                      "pic_str": "18548761162566034",
                      "pic": 18548761162566030
                  },
                  "dt": 202000,
                  "h": {
                      "br": 320000,
                      "fid": 0,
                      "size": 8092880,
                      "vd": -21700
                  },
                  "m": {
                      "br": 192000,
                      "fid": 0,
                      "size": 4855786,
                      "vd": -19200
                  },
                  "l": {
                      "br": 128000,
                      "fid": 0,
                      "size": 3237239,
                      "vd": -17700
                  },
                  "a": null,
                  "cd": "1",
                  "no": 1,
                  "rtUrl": null,
                  "ftype": 0,
                  "rtUrls": [],
                  "djId": 0,
                  "copyright": 2,
                  "s_id": 0,
                  "rtype": 0,
                  "rurl": null,
                  "mst": 9,
                  "cp": 7001,
                  "mv": 239054,
                  "publishTime": 1392912000007,
                  "privilege": {
                      "id": 28282300,
                      "fee": 8,
                      "payed": 0,
                      "st": 0,
                      "pl": 128000,
                      "dl": 0,
                      "sp": 7,
                      "cp": 1,
                      "subp": 1,
                      "cs": false,
                      "maxbr": 320000,
                      "fl": 128000,
                      "toast": false,
                      "flag": 0,
                      "preSell": false
                  }
              }
          ],
          "relatedInfo": null,
          "videoUserLiveInfo": null,
          "vid": "A8288CA4C7AEAD825548B8916D4F2BCC",
          "durationms": 289800,
          "playTime": 2233294,
          "praisedCount": 5723,
          "praised": false,
          "subscribed": false
      }
  },
  {
      "type": 1,
      "displayed": false,
      "alg": "onlineHotGroup",
      "extAlg": null,
      "data": {
          "alg": "onlineHotGroup",
          "scm": "1.music-video-timeline.video_timeline.video.181017.-295043608",
          "threadId": "R_VI_62_F8EA5B3496F7D111B80DE38609240986",
          "coverUrl": "https://p2.music.126.net/cgP1ecN2UoZOwx5zmsErLg==/109951163573311885.jpg",
          "height": 720,
          "width": 1280,
          "title": "全球好声音上那些惊艳导师的《Despacito》最佳翻唱现场！",
          "description": "盘点全球好声音上那些惊艳导师的《Despacito》最佳翻唱现场。每位选手都唱出了自己的特色，不一样的好听！[憨笑]",
          "commentCount": 4643,
          "shareCount": 8935,
          "resolutions": [
              {
                  "resolution": 240,
                  "size": 44281075
              },
              {
                  "resolution": 480,
                  "size": 72535099
              },
              {
                  "resolution": 720,
                  "size": 95555684
              }
          ],
          "creator": {
              "defaultAvatar": false,
              "province": 1000000,
              "authStatus": 0,
              "followed": false,
              "avatarUrl": "http://p1.music.126.net/Fn4S3zBPuUtqbY33FXrc0g==/109951165661336154.jpg",
              "accountStatus": 0,
              "gender": 1,
              "city": 1010000,
              "birthday": 883929600000,
              "userId": 347267113,
              "userType": 200,
              "nickname": "Dennnnnniel",
              "signature": "看我男朋友的个人简介干嘛？:(",
              "description": "",
              "detailDescription": "",
              "avatarImgId": 109951165661336160,
              "backgroundImgId": 109951165698066580,
              "backgroundUrl": "http://p1.music.126.net/QdqRMHtwWSEHvl4VkwRI0Q==/109951165698066572.jpg",
              "authority": 0,
              "mutual": false,
              "expertTags": [
                  "电子",
                  "欧美"
              ],
              "experts": {
                  "1": "音乐视频达人",
                  "2": "电子|欧美音乐资讯达人"
              },
              "djStatus": 10,
              "vipType": 11,
              "remarkName": null,
              "avatarImgIdStr": "109951165661336154",
              "backgroundImgIdStr": "109951165698066572"
          },
          "urlInfo": {
              "id": "F8EA5B3496F7D111B80DE38609240986",
              "url": "http://vodkgeyttp9.vod.126.net/vodkgeyttp8/xrFsFzsp_1505714223_shd.mp4?ts=1619323508&rid=1F423AD7C74CCE3ACEAA5BF55E732BDC&rl=3&rs=tTCttoILMNbnrjOXowOWKwyIUlcNKYfG&sign=6d165111b4758d317d0cda0f4a0f7762&ext=p6e863LWYwFO5hlV3qTyD1ouRa8j9D%2BJELso5ezqMspkSCxr18hUDji2DfBJPVQ8CmgUnVFfy1Ma5LnHPasTXFOHSAyB72EigNk6%2BC%2FZfzFzCXfJpnZsCHD55pWRsmq5oYZNPamPOtm2krGasylfCmPgNQKb20yeSUJlZoC741K3tYpmpvMPUAApRXsGD6%2Fl%2BLtSOX8lUXEuI25mdE5XiqcPHwQSRUWKxmBkLdDZna3n1apIyc%2FaZ22Ewi%2BM%2Bk3O",
              "size": 95555684,
              "validityTime": 1200,
              "needPay": false,
              "payInfo": null,
              "r": 720
          },
          "videoGroup": [
              {
                  "id": -18488,
                  "name": "#舞蹈「1M舞室舞曲」#",
                  "alg": "groupTagRank"
              },
              {
                  "id": 57106,
                  "name": "欧美现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 13164,
                  "name": "快乐",
                  "alg": "groupTagRank"
              },
              {
                  "id": 57108,
                  "name": "流行现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 1100,
                  "name": "音乐现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 58100,
                  "name": "现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 5100,
                  "name": "音乐",
                  "alg": "groupTagRank"
              }
          ],
          "previewUrl": null,
          "previewDurationms": 0,
          "hasRelatedGameAd": false,
          "markTypes": null,
          "relateSong": [
              {
                  "name": "Despacito (Remix)",
                  "id": 472361096,
                  "pst": 0,
                  "t": 0,
                  "ar": [
                      {
                          "id": 38154,
                          "name": "Luis Fonsi",
                          "tns": [],
                          "alias": []
                      },
                      {
                          "id": 31297,
                          "name": "Daddy Yankee",
                          "tns": [],
                          "alias": []
                      },
                      {
                          "id": 35531,
                          "name": "Justin Bieber",
                          "tns": [],
                          "alias": []
                      }
                  ],
                  "alia": [],
                  "pop": 100,
                  "st": 0,
                  "rt": null,
                  "fee": 8,
                  "v": 129,
                  "crbt": null,
                  "cf": "",
                  "al": {
                      "id": 35338908,
                      "name": "Despacito (Remix)",
                      "picUrl": "http://p4.music.126.net/vA4UF75gS1Qpyx07B0acrw==/18521273371761277.jpg",
                      "tns": [],
                      "pic_str": "18521273371761277",
                      "pic": 18521273371761276
                  },
                  "dt": 228826,
                  "h": {
                      "br": 320000,
                      "fid": 0,
                      "size": 9155440,
                      "vd": -28300
                  },
                  "m": {
                      "br": 192000,
                      "fid": 0,
                      "size": 5493281,
                      "vd": -25800
                  },
                  "l": {
                      "br": 128000,
                      "fid": 0,
                      "size": 3662202,
                      "vd": -24300
                  },
                  "a": null,
                  "cd": "1",
                  "no": 1,
                  "rtUrl": null,
                  "ftype": 0,
                  "rtUrls": [],
                  "djId": 0,
                  "copyright": 0,
                  "s_id": 0,
                  "rtype": 0,
                  "rurl": null,
                  "mst": 9,
                  "cp": 7003,
                  "mv": 0,
                  "publishTime": 1492358400000,
                  "privilege": {
                      "id": 472361096,
                      "fee": 8,
                      "payed": 0,
                      "st": 0,
                      "pl": 128000,
                      "dl": 0,
                      "sp": 7,
                      "cp": 1,
                      "subp": 1,
                      "cs": false,
                      "maxbr": 999000,
                      "fl": 128000,
                      "toast": false,
                      "flag": 4,
                      "preSell": false
                  }
              }
          ],
          "relatedInfo": null,
          "videoUserLiveInfo": null,
          "vid": "F8EA5B3496F7D111B80DE38609240986",
          "durationms": 456109,
          "playTime": 15314154,
          "praisedCount": 80967,
          "praised": false,
          "subscribed": false
      }
  },
  {
      "type": 1,
      "displayed": false,
      "alg": "onlineHotGroup",
      "extAlg": null,
      "data": {
          "alg": "onlineHotGroup",
          "scm": "1.music-video-timeline.video_timeline.video.181017.-295043608",
          "threadId": "R_VI_62_D0E3BFB5EC8BAE602604A7B41F57CA40",
          "coverUrl": "https://p2.music.126.net/Nm2aKTgwx6ORHrnrV0MTnw==/109951163574020619.jpg",
          "height": 720,
          "width": 1280,
          "title": "【BLACKPINK灵魂舞者Lisa】个人惊艳直拍",
          "description": "【BLACKPINK灵魂舞者Lisa】个人惊艳直拍",
          "commentCount": 2916,
          "shareCount": 11721,
          "resolutions": [
              {
                  "resolution": 240,
                  "size": 58768569
              },
              {
                  "resolution": 480,
                  "size": 103892491
              },
              {
                  "resolution": 720,
                  "size": 139241428
              }
          ],
          "creator": {
              "defaultAvatar": false,
              "province": 440000,
              "authStatus": 0,
              "followed": false,
              "avatarUrl": "http://p1.music.126.net/yX-5vhcILmLk3uMe5ZZ0cg==/109951165844530777.jpg",
              "accountStatus": 0,
              "gender": 2,
              "city": 440100,
              "birthday": -2209017600000,
              "userId": 1335670168,
              "userType": 204,
              "nickname": "D0Y0UNG",
              "signature": "①💚NCT2020！金道英6f/💙SEVENTEEN(6f.) 全圆佑🐱.“红绿灯下常驻人口（排名前100）”\n②两边都花钱做事 🚫bp\n③|懒人随心更|",
              "description": "",
              "detailDescription": "",
              "avatarImgId": 109951165844530780,
              "backgroundImgId": 109951164261259860,
              "backgroundUrl": "http://p1.music.126.net/-LAbd7EemHlx5ZfKLYpMmA==/109951164261259852.jpg",
              "authority": 0,
              "mutual": false,
              "expertTags": null,
              "experts": {
                  "1": "音乐视频达人"
              },
              "djStatus": 10,
              "vipType": 11,
              "remarkName": null,
              "avatarImgIdStr": "109951165844530777",
              "backgroundImgIdStr": "109951164261259852"
          },
          "urlInfo": {
              "id": "D0E3BFB5EC8BAE602604A7B41F57CA40",
              "url": "http://vodkgeyttp9.vod.126.net/vodkgeyttp8/h06jK9vJ_1806743272_shd.mp4?ts=1619323508&rid=1F423AD7C74CCE3ACEAA5BF55E732BDC&rl=3&rs=kJLAVdvaTSnglYnLBwHrEiSivvBuBMYB&sign=d980e4489a7b42ce2b3b88b796247a52&ext=p6e863LWYwFO5hlV3qTyD1ouRa8j9D%2BJELso5ezqMspkSCxr18hUDji2DfBJPVQ8CmgUnVFfy1Ma5LnHPasTXFOHSAyB72EigNk6%2BC%2FZfzFzCXfJpnZsCHD55pWRsmq5oYZNPamPOtm2krGasylfCmPgNQKb20yeSUJlZoC741K3tYpmpvMPUAApRXsGD6%2Fl%2BLtSOX8lUXEuI25mdE5XiqcPHwQSRUWKxmBkLdDZna3n1apIyc%2FaZ22Ewi%2BM%2Bk3O",
              "size": 139241428,
              "validityTime": 1200,
              "needPay": false,
              "payInfo": null,
              "r": 720
          },
          "videoGroup": [
              {
                  "id": -8001,
                  "name": "#热搜榜#",
                  "alg": "groupTagRank"
              },
              {
                  "id": 92105,
                  "name": "BLACKPINK",
                  "alg": "groupTagRank"
              },
              {
                  "id": 57107,
                  "name": "韩语现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 57110,
                  "name": "饭拍现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 57108,
                  "name": "流行现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 1101,
                  "name": "舞蹈",
                  "alg": "groupTagRank"
              },
              {
                  "id": 1100,
                  "name": "音乐现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 58100,
                  "name": "现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 5100,
                  "name": "音乐",
                  "alg": "groupTagRank"
              }
          ],
          "previewUrl": null,
          "previewDurationms": 0,
          "hasRelatedGameAd": false,
          "markTypes": null,
          "relateSong": [
              {
                  "name": "AS IF IT'S YOUR LAST (Japanese Ver.)",
                  "id": 502238187,
                  "pst": 0,
                  "t": 0,
                  "ar": [
                      {
                          "id": 12068017,
                          "name": "BLACKPINK",
                          "tns": [],
                          "alias": []
                      }
                  ],
                  "alia": [],
                  "pop": 100,
                  "st": 0,
                  "rt": null,
                  "fee": 8,
                  "v": 21,
                  "crbt": null,
                  "cf": "",
                  "al": {
                      "id": 36031601,
                      "name": "BLACKPINK",
                      "picUrl": "http://p4.music.126.net/3BPc7x_UVZWpHHjg9t4YYg==/109951163014329187.jpg",
                      "tns": [],
                      "pic_str": "109951163014329187",
                      "pic": 109951163014329180
                  },
                  "dt": 212773,
                  "h": {
                      "br": 320000,
                      "fid": 0,
                      "size": 8513872,
                      "vd": -44500
                  },
                  "m": {
                      "br": 192000,
                      "fid": 0,
                      "size": 5108341,
                      "vd": -42000
                  },
                  "l": {
                      "br": 128000,
                      "fid": 0,
                      "size": 3405575,
                      "vd": -40400
                  },
                  "a": null,
                  "cd": "1",
                  "no": 5,
                  "rtUrl": null,
                  "ftype": 0,
                  "rtUrls": [],
                  "djId": 0,
                  "copyright": 1,
                  "s_id": 0,
                  "rtype": 0,
                  "rurl": null,
                  "mst": 9,
                  "cp": 457010,
                  "mv": 0,
                  "publishTime": 1504022400007,
                  "privilege": {
                      "id": 502238187,
                      "fee": 8,
                      "payed": 0,
                      "st": 0,
                      "pl": 128000,
                      "dl": 0,
                      "sp": 7,
                      "cp": 1,
                      "subp": 1,
                      "cs": false,
                      "maxbr": 999000,
                      "fl": 128000,
                      "toast": false,
                      "flag": 69,
                      "preSell": false
                  }
              }
          ],
          "relatedInfo": null,
          "videoUserLiveInfo": null,
          "vid": "D0E3BFB5EC8BAE602604A7B41F57CA40",
          "durationms": 380456,
          "playTime": 7913592,
          "praisedCount": 79368,
          "praised": false,
          "subscribed": false
      }
  },
  {
      "type": 1,
      "displayed": false,
      "alg": "onlineHotGroup",
      "extAlg": null,
      "data": {
          "alg": "onlineHotGroup",
          "scm": "1.music-video-timeline.video_timeline.video.181017.-295043608",
          "threadId": "R_VI_62_8AD2BA553F0979189135A6B0C288563D",
          "coverUrl": "https://p2.music.126.net/QIkKB3CtcQ-rOVtOofd-cQ==/109951163572821436.jpg",
          "height": 720,
          "width": 1280,
          "title": "T-ara洗脑神曲《Lovey-Dovey》现场版，这舞蹈当年引发疯狂模仿！",
          "description": "T-ara洗脑神曲《Lovey-Dovey》现场版，这舞蹈当年火到不行，引发疯狂模仿！",
          "commentCount": 167,
          "shareCount": 132,
          "resolutions": [
              {
                  "resolution": 240,
                  "size": 25266875
              },
              {
                  "resolution": 480,
                  "size": 36104870
              },
              {
                  "resolution": 720,
                  "size": 57672725
              }
          ],
          "creator": {
              "defaultAvatar": false,
              "province": 340000,
              "authStatus": 0,
              "followed": false,
              "avatarUrl": "http://p1.music.126.net/C6VID_CReqmt8ETsUWaYTQ==/18499283139231828.jpg",
              "accountStatus": 0,
              "gender": 0,
              "city": 340100,
              "birthday": -2209017600000,
              "userId": 479954154,
              "userType": 201,
              "nickname": "音乐诊疗室",
              "signature": "当我坐在那架破旧古钢琴旁边的时候，我对最幸福的国王也不羡慕。（合作推广请私信，或者+V信：mjs927721）",
              "description": "",
              "detailDescription": "",
              "avatarImgId": 18499283139231828,
              "backgroundImgId": 1364493978647983,
              "backgroundUrl": "http://p1.music.126.net/i4J_uvH-pb4sYMsh4fgQAA==/1364493978647983.jpg",
              "authority": 0,
              "mutual": false,
              "expertTags": null,
              "experts": {
                  "1": "音乐视频达人",
                  "2": "音乐资讯达人"
              },
              "djStatus": 0,
              "vipType": 0,
              "remarkName": null,
              "avatarImgIdStr": "18499283139231828",
              "backgroundImgIdStr": "1364493978647983"
          },
          "urlInfo": {
              "id": "8AD2BA553F0979189135A6B0C288563D",
              "url": "http://vodkgeyttp9.vod.126.net/vodkgeyttp8/NllRvjNJ_127005756_shd.mp4?ts=1619323508&rid=1F423AD7C74CCE3ACEAA5BF55E732BDC&rl=3&rs=mhfWgCuOGFBIAhZQByawIZyKDKTWBewk&sign=36d8673eafd009fa6a6213602fa3f093&ext=p6e863LWYwFO5hlV3qTyD1ouRa8j9D%2BJELso5ezqMspkSCxr18hUDji2DfBJPVQ8CmgUnVFfy1Ma5LnHPasTXFOHSAyB72EigNk6%2BC%2FZfzFzCXfJpnZsCHD55pWRsmq5oYZNPamPOtm2krGasylfCmPgNQKb20yeSUJlZoC741K3tYpmpvMPUAApRXsGD6%2Fl%2BLtSOX8lUXEuI25mdE5XiqcPHwQSRUWKxmBkLdDZna3n1apIyc%2FaZ22Ewi%2BM%2Bk3O",
              "size": 57672725,
              "validityTime": 1200,
              "needPay": false,
              "payInfo": null,
              "r": 720
          },
          "videoGroup": [
              {
                  "id": -32331,
                  "name": "#韩国女团神曲集#",
                  "alg": "groupTagRank"
              },
              {
                  "id": 9127,
                  "name": "T-ara",
                  "alg": "groupTagRank"
              },
              {
                  "id": 13164,
                  "name": "快乐",
                  "alg": "groupTagRank"
              },
              {
                  "id": 57107,
                  "name": "韩语现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 57108,
                  "name": "流行现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 1100,
                  "name": "音乐现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 58100,
                  "name": "现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 5100,
                  "name": "音乐",
                  "alg": "groupTagRank"
              }
          ],
          "previewUrl": null,
          "previewDurationms": 0,
          "hasRelatedGameAd": false,
          "markTypes": null,
          "relateSong": [],
          "relatedInfo": null,
          "videoUserLiveInfo": null,
          "vid": "8AD2BA553F0979189135A6B0C288563D",
          "durationms": 212068,
          "playTime": 194066,
          "praisedCount": 826,
          "praised": false,
          "subscribed": false
      }
  },
  {
      "type": 1,
      "displayed": false,
      "alg": "onlineHotGroup",
      "extAlg": null,
      "data": {
          "alg": "onlineHotGroup",
          "scm": "1.music-video-timeline.video_timeline.video.181017.-295043608",
          "threadId": "R_VI_62_7F14D1B9101E5775988DCE5ADC625260",
          "coverUrl": "https://p2.music.126.net/4exz5NqbiJ6bTTnXy5NgIQ==/109951163574215321.jpg",
          "height": 720,
          "width": 1080,
          "title": "16年前她凭借这首歌一炮而红，火遍亚洲！",
          "description": "16年前她凭借这首歌一炮而红，火遍亚洲！迅速跨入一线歌手行列！",
          "commentCount": 173,
          "shareCount": 126,
          "resolutions": [
              {
                  "resolution": 240,
                  "size": 11084696
              },
              {
                  "resolution": 480,
                  "size": 18464068
              },
              {
                  "resolution": 720,
                  "size": 26631157
              }
          ],
          "creator": {
              "defaultAvatar": false,
              "province": 1000000,
              "authStatus": 0,
              "followed": false,
              "avatarUrl": "http://p1.music.126.net/VPGeeVnQ0jLp4hK9kj0EPg==/18897306347016806.jpg",
              "accountStatus": 0,
              "gender": 0,
              "city": 1002400,
              "birthday": -2209017600000,
              "userId": 449979212,
              "userType": 0,
              "nickname": "全球潮音乐",
              "signature": "有时候音乐是陪我熬过那些夜晚的唯一朋友。",
              "description": "",
              "detailDescription": "",
              "avatarImgId": 18897306347016810,
              "backgroundImgId": 18987466300481468,
              "backgroundUrl": "http://p1.music.126.net/qx6U5-1LCeMT9t7RLV7r1A==/18987466300481468.jpg",
              "authority": 0,
              "mutual": false,
              "expertTags": null,
              "experts": {
                  "1": "音乐视频达人",
                  "2": "华语音乐|欧美音乐资讯达人"
              },
              "djStatus": 0,
              "vipType": 0,
              "remarkName": null,
              "avatarImgIdStr": "18897306347016806",
              "backgroundImgIdStr": "18987466300481468"
          },
          "urlInfo": {
              "id": "7F14D1B9101E5775988DCE5ADC625260",
              "url": "http://vodkgeyttp9.vod.126.net/vodkgeyttp8/qHpndy1T_1907540109_shd.mp4?ts=1619323508&rid=1F423AD7C74CCE3ACEAA5BF55E732BDC&rl=3&rs=cpsAkRTwEiwBnuWUzXLqdjrRVEPIWKvm&sign=c0ef1c8c1bea6f820f66b3ff464c3c05&ext=p6e863LWYwFO5hlV3qTyD1ouRa8j9D%2BJELso5ezqMspkSCxr18hUDji2DfBJPVQ8CmgUnVFfy1Ma5LnHPasTXFOHSAyB72EigNk6%2BC%2FZfzFzCXfJpnZsCHD55pWRsmq5oYZNPamPOtm2krGasylfCmPgNQKb20yeSUJlZoC741K3tYpmpvMPUAApRXsGD6%2Fl%2BLtSOX8lUXEuI25mdE5XiqcPHwQSRUWKxmBkLdDZna3n1apIyc%2FaZ22Ewi%2BM%2Bk3O",
              "size": 26631157,
              "validityTime": 1200,
              "needPay": false,
              "payInfo": null,
              "r": 720
          },
          "videoGroup": [
              {
                  "id": 57107,
                  "name": "韩语现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 59108,
                  "name": "巡演现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 57108,
                  "name": "流行现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 1100,
                  "name": "音乐现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 58100,
                  "name": "现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 5100,
                  "name": "音乐",
                  "alg": "groupTagRank"
              }
          ],
          "previewUrl": null,
          "previewDurationms": 0,
          "hasRelatedGameAd": false,
          "markTypes": null,
          "relateSong": [],
          "relatedInfo": null,
          "videoUserLiveInfo": null,
          "vid": "7F14D1B9101E5775988DCE5ADC625260",
          "durationms": 108647,
          "playTime": 348673,
          "praisedCount": 978,
          "praised": false,
          "subscribed": false
      }
  },
  {
      "type": 1,
      "displayed": false,
      "alg": "onlineHotGroup",
      "extAlg": null,
      "data": {
          "alg": "onlineHotGroup",
          "scm": "1.music-video-timeline.video_timeline.video.181017.-295043608",
          "threadId": "R_VI_62_9A5449EB4FC96D2B91C770061392C7A3",
          "coverUrl": "https://p2.music.126.net/qJLrHFpnHXznYynHyBIUxw==/109951165087520127.jpg",
          "height": 720,
          "width": 1280,
          "title": "【begin again4】刘宪华&crush 两首超甜情歌 互动好甜",
          "description": null,
          "commentCount": 8,
          "shareCount": 25,
          "resolutions": [
              {
                  "resolution": 240,
                  "size": 17329924
              },
              {
                  "resolution": 480,
                  "size": 28830902
              },
              {
                  "resolution": 720,
                  "size": 44368096
              }
          ],
          "creator": {
              "defaultAvatar": false,
              "province": 220000,
              "authStatus": 0,
              "followed": false,
              "avatarUrl": "http://p1.music.126.net/RN82mcCiLbunOc-iLkxf5g==/109951165877304293.jpg",
              "accountStatus": 0,
              "gender": 2,
              "city": 220100,
              "birthday": 918921600000,
              "userId": 360504922,
              "userType": 204,
              "nickname": "奶豆豆pcy",
              "signature": "「那天碰巧一起看日落 你沒看我 我沒看日落」",
              "description": "",
              "detailDescription": "",
              "avatarImgId": 109951165877304290,
              "backgroundImgId": 109951165824987600,
              "backgroundUrl": "http://p1.music.126.net/vO43Bs0gBUl5lbLJGyLreA==/109951165824987595.jpg",
              "authority": 0,
              "mutual": false,
              "expertTags": null,
              "experts": {
                  "1": "音乐视频达人"
              },
              "djStatus": 0,
              "vipType": 11,
              "remarkName": null,
              "avatarImgIdStr": "109951165877304293",
              "backgroundImgIdStr": "109951165824987595"
          },
          "urlInfo": {
              "id": "9A5449EB4FC96D2B91C770061392C7A3",
              "url": "http://vodkgeyttp9.vod.126.net/cloudmusic/G51UTxgE_3040441905_shd.mp4?ts=1619323508&rid=1F423AD7C74CCE3ACEAA5BF55E732BDC&rl=3&rs=gGmGwIBlQbIuPRMtrUAHAGkBXAVHaWbo&sign=82db3ef2a3899bdac79d663e6a010aef&ext=p6e863LWYwFO5hlV3qTyD1ouRa8j9D%2BJELso5ezqMspkSCxr18hUDji2DfBJPVQ8CmgUnVFfy1Ma5LnHPasTXFOHSAyB72EigNk6%2BC%2FZfzFzCXfJpnZsCHD55pWRsmq5oYZNPamPOtm2krGasylfCmPgNQKb20yeSUJlZoC741K3tYpmpvMPUAApRXsGD6%2Fl%2BLtSOX8lUXEuI25mdE5XiqcPHwQSRUWKxmBkLdDZna3n1apIyc%2FaZ22Ewi%2BM%2Bk3O",
              "size": 44368096,
              "validityTime": 1200,
              "needPay": false,
              "payInfo": null,
              "r": 720
          },
          "videoGroup": [
              {
                  "id": 59106,
                  "name": "街头表演",
                  "alg": "groupTagRank"
              },
              {
                  "id": 13139,
                  "name": "韩语",
                  "alg": "groupTagRank"
              },
              {
                  "id": 3101,
                  "name": "综艺",
                  "alg": "groupTagRank"
              },
              {
                  "id": 4101,
                  "name": "娱乐",
                  "alg": "groupTagRank"
              },
              {
                  "id": 58101,
                  "name": "听BGM",
                  "alg": "groupTagRank"
              },
              {
                  "id": 1100,
                  "name": "音乐现场",
                  "alg": "groupTagRank"
              },
              {
                  "id": 58100,
                  "name": "现场",
                  "alg": "groupTagRank"
              }
          ],
          "previewUrl": null,
          "previewDurationms": 0,
          "hasRelatedGameAd": false,
          "markTypes": null,
          "relateSong": [],
          "relatedInfo": null,
          "videoUserLiveInfo": null,
          "vid": "9A5449EB4FC96D2B91C770061392C7A3",
          "durationms": 198000,
          "playTime": 72996,
          "praisedCount": 457,
          "praised": false,
          "subscribed": false
      }
  }
];
let mvData = this.data.mvData
mvData.push(...newVideoList)
this.setData({
  mvData
})


  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})